<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>btcrobot 算法交易智能平台</title>
    <meta name="description" content="btcrobot is a Bitcoin, Litecoin and Altcoin trading bot written in golang,
  it features multiple trading methods using technical analysis."/>

    <meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">

    <!-- Loading Bootstrap -->
    <link href="bootstrap/css/bootstrap.css" rel="stylesheet">

    <!-- Loading Flat UI -->
    <link href="css/flat-ui.css" rel="stylesheet">
    <link href="css/demo.css" rel="stylesheet">

    <link rel="shortcut icon" href="images/favicon.ico">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
    <!--[if lt IE 9]>
      <script src="js/html5shiv.js"></script>
      <script src="js/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <div class="container">
      <div class="demo-headline">
        <h1 class="demo-logo">
          <small>btcrobot算法交易智能平台</small>
        </h1>
      </div> <!-- /demo-headline -->


      <div class="row demo-row">
        <div class="col-xs-12">
          <nav class="navbar navbar-inverse navbar-embossed" role="navigation">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-01">
                <span class="sr-only">Toggle navigation</span>
              </button>
            </div>
            <div class="collapse navbar-collapse" id="navbar-collapse-01">
              <ul class="nav navbar-nav navbar-left">           
                <li><a href="/">主页<span class="navbar-unread">1</span></a></li>
                <li class="dropdown">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown">趋势图<b class="caret"></b></a>
                  <span class="dropdown-arrow"></span>
                  <ul class="dropdown-menu">
                    <li><a href="/indictor_huobi.html" rel="nofollow">火币指标</a></li> 
                    <li class="divider"></li>
                    <li><a href="/indictor_okcoin.html" rel="nofollow">OKcoin指标</a></li> 
                  </ul>
                </li>
                    <li><a href="/engine.html" rel="nofollow">机器人</a></li> 
                    <li><a href="/trade.html" rel="nofollow">操盘手</a></li> 
                    <li><a href="/secret.html" rel="nofollow">安全设置</a></li> 
                <li><a href="https://github.com/philsong/btcrobot/wiki" target="_blank">帮助</a></li>
               </ul>
            </div><!-- /.navbar-collapse -->
          </nav><!-- /navbar -->
        </div>
      </div> <!-- /row -->

      <form accept-charset="UTF-8" action="/engine" enctype="multipart/form-data" id="update_conf" method="post">

      <div class="row">
        <div class="col-xs-4">
          <label class="share-label" >自动交易</label>
          <input type="checkbox" data-toggle="switch" id="enable_trading" name="enable_trading" />
        </div>
      </div> <!-- /row -->

      <hr>

      <div class="row">
        <div class="col-xs-4">
          <label class="share-label" >死多模式</label>
          <input type="checkbox" data-toggle="switch" id="discipleMode"  name="discipleMode"/>
        </div>
        
        <div class="col-xs-4">
            <div class="form-group">
              <div class="input-group">
                <span class="input-group-addon">死多偏移价</span>
                <input type="text" class="form-control" placeholder="死多偏移价 CNY" id="discipleValue" name="discipleValue"/> 
              </div>  
            </div>
        </div>

        <div class="swatches-desc-col">
          <h6 class="palette-headline">单位：CNY</h6>
          <p class="palette-paragraph">
            注意:高风险!一旦开启死多模式，则卖出或止损时，挂单价=买入价+死多偏移价，所以币可能会卖不出,适合永远不想赔钱卖币的死多.
          </p>
        </div> <!-- /swatches desc -->
      </div> <!-- /row -->

      <hr>

      <div class="row">


        <div class="col-xs-4">
          <label class="share-label" >邮件通知</label>
          <input type="checkbox" data-toggle="switch" id="enable_email"  name="enable_email"/>
        </div>

        <div class="col-xs-4">
            <div class="form-group">
              <div class="input-group">
                <span class="input-group-addon">接收email@</span>
                <input type="text" class="form-control" placeholder="接收email" id="to_email" name="to_email"/>
              </div>  
            </div>
        </div>
      </div> <!-- /row -->

      <hr>

      <div class="row demo-row">
        <div class="col-xs-2">
          *市场数据源
          <select  name="datacenter"  class="select-block" id="datacenter" >
            <option value="huobi">huobi</option>
            <option value="okcoin">okcoin</option>
            <option value="peatio">peatio</option>
            <option value="bittrex">bittrex</option>
            <option value="bitstamp">bitstamp(todo)</option>
            <option value="BTC-E">BTC-E(todo)</option>
          </select>
        </div>

        <div class="col-xs-2">
          *交易所
          <select   class="select-block"  id="tradecenter"  name="tradecenter" >
            <option value="huobi">huobi</option>
            <option value="okcoin">okcoin</option>
            <option value="bitvc">bitvc</option>
            <option value="bittrex">bittrex</option>
            <option value="peatio">peatio</option>
            <option value="simulate">simulate</option>
            <option value="bitstamp">bitstamp(todo)</option>
            <option value="BTC-E">BTC-E(todo)</option>
          </select>
        </div>

        <div class="col-xs-2">
          *交易币种
          <select class="select-block" id="symbol" name="symbol" >
            <option value="btc_cny">btc_cny</option>
            <option value="ltc_cny">ltc_cny</option>
            <option value="ALL">ALL</option>
            <option value="btc_ltc">btc_ltc(todo)</option>
            <option value="ltc_btc">ltc_btc(todo)</option>
          </select>
        </div>
        
        <div class="col-xs-3">
          *交易策略
          <select class="select-block" id="strategy"  name="strategy" data-width="auto" onChange="onStrategyUI();">
            <option value="EMA">EMA</option>
            <option value="MACD">MACD</option>
            <option value="EMAMACDEMA">EMA+多次MACD+EMA</option>
            <option value="EMAMACD">EMA+单次MACD</option>
            <option value="KDJ">KDJ</option>
            <option value="OPENORDER">盘口高频套利</option>                  
            <option value="HLCross">k线高低突破</option>
            <option value="the3crow">3只乌鸦</option>
            <option value="circular">循环下单</option>
            <option value="KDJ-EX">KDJ-EX</option>     
            <option value="KDJ-XC">KDJ-XC(私密)</option>    
            <option value="xxx">xxx(自定义策略)</option>
            <option value="MYEMA">MyEMA</option>
            <option value="MYMACD">MyMACD</option>
            <option value="THREELINE">三均线</option>
          </select>
        </div>
        
        <div class="col-xs-2">
          <div class="form-group">
            *K线周期
            <select value="" class="select-block" id="tick_interval" name="tick_interval">
              <option value="100">1 天</option>
              <option value="60">1 小时</option>
              <option value="30">30 分钟</option>
              <option value="15">15 分钟</option>
              <option value="5">5 分钟</option>
              <option value="1">1 分钟</option>
            </select>
          </div>  
        </div>

        <div class="col-xs-1">
          *运行
          <input type="text" class="form-control" placeholder="运行时长" id="totalHour" name="totalHour" />小时
        </div>
      </div> <!-- /row -->


      <div class="row demo-swatches-row" >
        <div class="col-xs-3">
          <div class="form-group">
            <div class="input-group">
              <span class="input-group-addon">交易数量</span>
              <input type="text" class="form-control" placeholder="交易数量"  id="tradeAmount" name="tradeAmount"/>             
            </div>  
          </div>
        </div>

        <div class="swatches-desc-col">
          <h6 class="palette-headline">交易数量</h6>
          <p class="palette-paragraph">
            BTC/LTC（BTC最小0.01，LTC最小0.1）
          </p>
        </div> <!-- /swatches desc -->
      </div> <!-- /row -->

      <div class="row demo-swatches-row" >
        <div class="col-xs-3">
          <div class="form-group">
            <div class="input-group">
              <span class="input-group-addon">交易滑动量</span>
              <input type="text" class="form-control" placeholder="交易滑动量" id="slippage" name="slippage" />
            </div>  
          </div>
        </div>

        <div class="swatches-desc-col">
          <h6 class="palette-headline">交易滑动量</h6>
          <p class="palette-paragraph">
           ‰  买入价=市价*(1+交易滑动量*0.01)，卖出价=市价*(1-交易滑动量*0.01)
          </p>
        </div> <!-- /swatches desc -->
      </div> <!-- /row -->

      <div class="row demo-swatches-row" >
        <div class="col-xs-3">
          <div class="form-group">
            <div class="input-group">
              <span class="input-group-addon">交易止损量</span>
              <input type="text" class="form-control" placeholder="交易止损量" id="stoploss" name="stoploss" />             
            </div>  
          </div>
        </div>

        <div class="swatches-desc-col">
          <h6 class="palette-headline">交易止损量</h6>
          <p class="palette-paragraph">
            %  当市价低于买入价*(1-交易停损量*0.01)时，平仓止损防暴跌
          </p>
        </div> <!-- /swatches desc -->
      </div> <!-- /row -->

      <div class="row demo-swatches-row"  style="display: none" >
        <div class="col-xs-3">
          <div class="form-group">
            <div class="input-group">
              <span class="input-group-addon">交易止盈量</span>
              <input type="text" class="form-control" placeholder="交易止盈量" id="takeprofit" name="takeprofit" />             
            </div>  
          </div>
        </div>

        <div class="swatches-desc-col">
          <h6 class="palette-headline">交易止盈量</h6>
          <p class="palette-paragraph">
            %  当市价高于买入价*(1+交易止盈量*0.01)时，平仓止盈
          </p>
        </div> <!-- /swatches desc -->
      </div> <!-- /row -->

      <hr>
      <div id="divkdj">
        <div class="row demo-swatches-row" >
          <div class="col-xs-3">
            <div class="form-group">
              <div class="input-group">
                <span class="input-group-addon">K白线</span>
                <input type="text" class="form-control" placeholder="9" disabled="disabled" id="k" name="k" />             
              </div>  
            </div>
          </div>

          <div class="col-xs-3">
            <div class="form-group">
              <div class="input-group">
                <span class="input-group-addon">D黄线</span>
                <input type="text" class="form-control" placeholder="3" disabled="disabled" id="d" name="d"/>             
              </div>  
            </div>
          </div>

          <div class="col-xs-3">
            <div class="form-group">
              <div class="input-group">
                <span class="input-group-addon">J红线</span>
                <input type="text" class="form-control" placeholder="3" disabled="disabled" id="j" name="j" />             
              </div>  
            </div>
          </div>

        </div> <!-- /row -->
      </div> <!-- /divkdj -->

      <div id="divcircular">
        <div class="row demo-swatches-row" >
          <div class="col-xs-3">
            <div class="form-group">
              <div class="input-group">
                <span class="input-group-addon">基准价</span>
                <input type="text" class="form-control" placeholder="2770" id="basePrice" name="basePrice" />             
              </div>  
            </div>
          </div>

          <div class="col-xs-3">
            <div class="form-group">
              <div class="input-group">
                <span class="input-group-addon">波动值</span>
                <input type="text" class="form-control" placeholder="5"  id="fluctuation" name="fluctuation"/>             
              </div>  
            </div>
          </div>


        </div> <!-- /row -->
      </div> <!-- /divkdj -->

       
      <div id="divema">
        <div class="row demo-swatches-row" >
          <div class="col-xs-3">
            <div class="form-group">
              <div class="input-group">
                <span class="input-group-addon">短期EMA</span>
                <input type="text" class="form-control" placeholder="短期指数移动平均线,单位为K线周期" id="shortEMA" name="shortEMA" />             
              </div>  
            </div>
          </div>

          <div class="col-xs-3">
            <div class="form-group">
              <div class="input-group">
                <span class="input-group-addon">长期EMA</span>
                <input type="text" class="form-control" placeholder="长期指数移动平均线,单位为K线周期" id="longEMA" name="longEMA"/>             
              </div>  
            </div>
          </div>

          <div class="col-xs-3" id="divsignalPeriod">
            <div class="form-group">
              <div class="input-group">
                <span class="input-group-addon">MACD信号线</span>
                <input type="text" class="form-control" placeholder="MACD信号线,单位为K线周期" id="signalPeriod" name="signalPeriod"/>             
              </div>  
            </div>
          </div>
        </div> <!-- /row -->

        <div class="row demo-swatches-row" id="divbuyThreshold">
          <div class="col-xs-4">
            <div class="form-group">
              <div class="input-group">
                <span class="input-group-addon">买入diff阀值</span>
                <input type="text" class="form-control" placeholder="0.00003" id="buyThreshold" name="buyThreshold" />             
              </div>  
            </div>
          </div>

          <div class="swatches-desc-col">
            <h6 class="palette-headline">买入diff阀值</h6>
            <p class="palette-paragraph">
              (即使EMA金叉，直到EMA diff大于买入diff阀值才进行买入)
            </p>
          </div> <!-- /swatches desc -->
        </div> <!-- /row -->
        
        <div class="row demo-swatches-row" id="divsellThreshold" >   
          <div class="col-xs-4">
            <div class="form-group">
              <div class="input-group">
                <span class="input-group-addon">卖出diff阀值</span>
                <input type="text" class="form-control" placeholder="0.00003" id="sellThreshold" name="sellThreshold" />             
              </div>  
            </div>
          </div>

          <div class="swatches-desc-col">
            <h6 class="palette-headline">卖出diff阀值</h6>
            <p class="palette-paragraph">
              (即使EMA死叉，直到EMA diff小于卖出diff阀值才进行卖出)
            </p>
          </div> <!-- /swatches desc -->
        </div> <!-- /row -->


        <div class="row demo-swatches-row" id="divMACDbuyThreshold">
          <div class="col-xs-4">
            <div class="form-group">
              <div class="input-group">
                <span class="input-group-addon">买入Histogram阀值</span>
                <input type="text" class="form-control" placeholder="0.00003" id="MACDbuyThreshold" name="MACDbuyThreshold" />             
              </div>  
            </div>
          </div>

          <div class="swatches-desc-col">
            <h6 class="palette-headline">买入Histogram阀值</h6>
            <p class="palette-paragraph">
              (即使MACD金叉，直到MACD Histogram大于买入Histogram阀值才进行买入)
            </p>
          </div> <!-- /swatches desc -->
      </div> <!-- /divema -->

      <div class="row demo-swatches-row" id="divMACDsellThreshold">
          <div class="col-xs-4">
            <div class="form-group">
              <div class="input-group">
                <span class="input-group-addon">卖出Histogram阀值</span>
                <input type="text" class="form-control" placeholder="0.00003" id="MACDsellThreshold" name="MACDsellThreshold" />             
              </div>  
            </div>
          </div>

          <div class="swatches-desc-col">
            <h6 class="palette-headline">卖出Histogram阀值</h6>
            <p class="palette-paragraph">
              (即使MACD死叉，直到MACD Histogram小于卖出Histogram阀值才进行卖出)
            </p>
          </div> <!-- /swatches desc -->
      </div> <!-- /row -->

      </div><!-- /row -->
     
      <div class="row demo-swatches-row" >
        <div class="col-xs-1">
          <input class="btn btn-primary" data-disable-with="正在保存" name="commit" type="submit" value="保存配置"/>
         </div>
      </div>

    </div> <!-- /container -->

    <footer>
      <div class="container">
        <div class="row">
          <div class="col-xs-6">
            <h3 class="footer-title">BTC/LTC自动化算法交易引擎.</h3>
            <p>
              <a href="https://github.com/philsong/btcrobot" target="_blank"> 代码库https://github.com/philsong/btcrobot</a>
            </p>

            <p>
              <a href="http://weibo.com/bocaicfa" target="_blank">微博http://weibo.com/bocaicfa</a>
            </p>
            
            <P>交易策略模型群：375145175</p>
            <p>机器人使用互助群：124603104</P>
          </div> <!-- /col-xs-7 -->

          <div class="col-xs-6">
            <div class="footer-banner">
              <h3 class="footer-title">捐助开发</h3>
              <ul>
                <li>感谢您对开源的支持</li>

                <li>BTC： 1NDnnWCUu926z4wxA3sNBGYWNQD3mKyes8</li>

                <li><a href="https://github.com/philsong/btcrobot/wiki/%E6%84%9F%E8%B0%A2%E6%8D%90%E5%8A%A9%E5%BC%80%E5%8F%91%E7%9A%84%E4%BA%BA" target="_blank">捐助人员列表</a></li>
              </ul>
            </div>
          </div>
        </div>
      </div>
    </footer>
    
    <!-- Load JS here for greater good =============================-->
  

    <script src="js/jquery-1.8.3.min.js"></script>
    <script src="js/jquery-ui-1.10.3.custom.min.js"></script>
    <script src="js/jquery.ui.touch-punch.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/bootstrap-select.js"></script>
    <script src="js/bootstrap-switch.js"></script>
    <script src="js/flatui-checkbox.js"></script>
    <script src="js/flatui-radio.js"></script>
    <script src="js/jquery.tagsinput.js"></script>
    <script src="js/jquery.placeholder.js"></script>
    <script src="js/jquery.stacktable.js"></script>
    <script src="http://vjs.zencdn.net/4.3/video.js"></script>
    <script src="js/engine.js"></script>
    <script src="js/application.js"></script>
  </body>
</html>
